<template>
    <table border="1">
        <thead>
           <tr>
                <td>账号</td>
                <td>密码</td>
                <td>电话</td>
                <td>地址</td>
           </tr>
        </thead>
        <tbody>
                <tr v-for="h in data">
                    <td>{{ h.Name }}</td>
                    <td>{{ h.Pwd }}</td>
                    <td>{{ h.Phone }}</td>
                    <td>{{ h.Addr }}</td>
                </tr>
        </tbody>
    </table>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref } from 'vue';
//文档就绪函数
import { onMounted } from 'vue';

const data=ref([{
    "Id": 0,
    "Name": "string",
    "Pwd": "string",
    "Phone": "string",
    "Addr": "string"
}])


onMounted(()=>{
    Show();
})
const Show=()=>{
    axios.get("https://localhost:7011/api/Member/GetMembers",{params:data.value}).then(res=>{

        data.value=res.data;
        

    })
}

</script>
